從 Windows 把 repo 搬到 WSL再一次性 push 所有 branch 到GitHub 這樣就能避開 aux 檔名問題

太好了 👍
那我幫你整理一個 完整流程,讓你可以在 Windows 上透過 WSL + Ubuntu 把目前 repo 的所有 branch 推送到 GitHub,而不會再遇到 aux 這類檔名問題。


🛠️ 步驟一:安裝 WSL + Ubuntu

  1. 在 Windows PowerShell (管理員模式) 執行:
    wsl --install -d Ubuntu
    
    這會安裝 WSL 和 Ubuntu。
  2. 安裝完成後,重新開機,然後在開始選單打開 Ubuntu

🛠️ 步驟二:設定 Git 環境

在 Ubuntu 終端機裡:

sudo apt update
sudo apt install git -y

設定 Git 使用者資訊:

git config --global user.name "你的名字"
git config --global user.email "你的Email"

🛠️ 步驟三:把 Windows repo 搬到 WSL

你的 repo 在 m:\GitHub\Logitech\msm-5.15\msm-5.15
在 WSL 裡,Windows 磁碟會掛載在 /mnt/m
所以你可以:

cd /mnt/m/GitHub/Logitech/msm-5.15/msm-5.15

確認 repo 正常:

git status

🛠️ 步驟四:推送所有 branch 到 GitHub

  1. 確認遠端名稱:
    git remote -v
    
    通常會顯示 origin 指向 GitHub。
  2. 推送所有 branch:
    git push --all origin
    
  3. 如果也要推送 tag:
    git push --tags origin
    

✅ 結果

這樣就能把 所有本地 branch 推送到 GitHub,而不會再被 Windows 的 aux 保留字限制卡住。


Also See

File14FileLast Modified
把目前repo 所有的branch都push 到github把目前repo 所有的branch都push 到github2:24 PM - January 12, 2026
把目前 branch 上的修改(尚未 commit 的檔案)直接帶到一個新的 branch把目前 branch 上的修改(尚未 commit 的檔案)直接帶到一個新的 branch2:24 PM - January 12, 2026
git指定初始化的 branch 名稱git指定初始化的 branch 名稱2:24 PM - January 12, 2026
github上的repo clone下來check out 某一個dev branchgithub上的repo clone下來check out 某一個dev branch2:24 PM - January 12, 2026
github一台電腦同時使用兩個 GitHub 帳號github一台電腦同時使用兩個 GitHub 帳號2:24 PM - January 12, 2026
github actionsgithub actions2:24 PM - January 12, 2026
git 重新再從github上pull 所有branchgit 重新再從github上pull 所有branch2:24 PM - January 12, 2026
Git 裡查看 configurationGit 裡查看 configuration2:24 PM - January 12, 2026
git 恢復到最近一次 git pull狀態,取消本地修改git 恢復到最近一次 git pull狀態,取消本地修改2:24 PM - January 12, 2026
git 初始化與推送流程圖git 初始化與推送流程圖2:24 PM - January 12, 2026
git 中查看commit歷史資訊git 中查看commit歷史資訊2:24 PM - January 12, 2026
git 中修改檔名且保留原來commit紀錄git 中修改檔名且保留原來commit紀錄2:24 PM - January 12, 2026
git Remote 常見情境與操作git Remote 常見情境與操作2:24 PM - January 12, 2026
git GUI tool, SourceTreegit GUI tool, SourceTree2:24 PM - January 12, 2026